import { listSelectClient } from '@/api/basicData/client/client.js'

export const ClientSelect1 = {
  data() {
    return {
      // 供应商列表表头信息
      ClientTableKeys1: [
        {
          width: 200,
          key: 'clientName',
          title: '客户名称'
        }, {
          width: 200,
          key: 'contactName',
          title: '联系人'
        }, {
          width: 200,
          key: 'phone',
          title: '联系电话'
        }

      ]
    }
  },
  methods: {
    /*    弹窗组件自定义事件    */
    getlistClient1({ pageNum, pageSize, keyWord }) {
      // 查询列表
      listSelectClient({
        pageNum, pageSize, keyWord
      }).then(resp => {
        let clientList = resp.rows || []
        let total = resp.total
        // 数据回传
        this.$refs.ClientSelect1.receive(productList, total)
      })
    },
    updateQueryParamsForClient1(clientName) {
      this.form.clientName = clientName
    },
    selectDialogItemForClient1({ clientName }) {
      this.$refs.ClientSelect1.formItemKeyWord = clientName
    }
  }
}

